<!DOCTYPE HTML>
<html>
<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>计数器</title>
</head>
<body>
<script type="text/javascript">
			if(localStorage.pagecount) {
				localStorage.pagecount = Number(localStorage.pagecount) + 1;
			} else {
				localStorage.pagecount = 1;
			}
			document.write("总访问数：<br />" + localStorage.pagecount );

			if(sessionStorage.pagecount) {
				sessionStorage.pagecount = Number(sessionStorage.pagecount) + 1;
			} else {
				sessionStorage.pagecount = 1;
			}
			document.write("<br />当前会话内访问数：<br />" + sessionStorage.pagecount );

</script>
</body>
</html>  
